1. Field of the Invention
The present invention relates to an encoding and/or decoding system for three-dimensional color ultrasonic image.
2. Description of the Related Art
In general, a JPEG encoding method is widely used for encoding ultrasonic images. The JPEG encoding method is classified into a lossless encoding method and a lossy encoding method. The lossless encoding method can keep original information even with passing through processes of compression and expansion, and the lossy encoding method cannot restore original information completely since loss of information occurs in the processes of compression and expansion. Although the lossless encoding method has a lower compression rate compared to the lossy encoding method, the former can keep an original quality of image better than the latter. Thus the lossless encoding method is more efficient for applications which do not allow degradation of image quality. Also, although the lossy encoding method cannot regenerate an original image completely, it can obtain a considerably practical decoded image quality even in a high compression rate.
As shown in FIG. 1, three-dimensional color ultrasonic image data is classified into zero pixel data, gray pixel data, and indexed color pixel data having a pixel value of 0, P1 and P2, respectively. In FIG. 1, zero pixel data has a pixel value of 0, and gray pixel data has a pixel value of P1 in which original gray brightness values of eight bits (0-255) are quantized into six bits from 1 to 63 except 0. The indexed color pixel data has a pixel value of P2 in which 24-bit color data of R, G, and B is indexed into 64 up to 255, using a predetermined color index table. In order to encode three-dimensional color ultrasonic images including the indexed color pixel data, only the JPEG lossless encoding method is used among the conventional JPEG encoding methods, which will be described with reference to FIG. 2.
FIG. 2 is a block diagram showing a conventional JPEG lossless encoding and decoding system. In the encoding portion, a subtracter 21 subtracts a predictive value Pm which is predicted from a previous pixel brightness value from an original pixel brightness value Pn, to thereby obtain a predictive error En. The predictive error En obtained in the subtracter 21 is output to a quantizer 22. The quantizer 22 receives the predictive error En from the subtracter 21 and performs quantization. An entropy encoder 23 receives an output value from the quantizer 22 and performs an entropy encoding by means of Huffman coding, to thereby provide a bitstream to the decoding portion. Meanwhile, the output value of the quantizer 22 is input to an adder 24 in addition to the entropy encoder 23. The adder 24 outputs an addition result, that is, a previous pixel brightness value Pnxe2x88x921 to a first predictor 25 in order to predict a brightness value of a following input pixel. In the decoding portion, an entropy decoder 26 entropy-decodes the input bitstream. The entropy-decoded data is inversely quantized in an inverse quantizer 27 to thereby generate a predictive error En. An adder 28 receives the predictive error En generated in the inverse quantizer 27 and adds it to a predictive value Pm output from a second predictor 29, thereby outputting the original pixel brightness value Pn.
The above-described three-dimensional color ultrasonic images contains (locally existing indexed color pixel data, causing that the JPEG lossy encoding method cannot be applied thereto. Also, although the three-dimensional color ultrasonic image composed of different data such as zero pixel data, gray pixel data and indexed color pixel data uses a JPEG lossless encoding method which encodes images using an inter-pixel correlation, the efficiency thereof is considerably lowered due to the characteristics of the three-dimensional color ultrasonic image.
To solve the above problems, it is an object of the present invention to provide an encoding and/or decoding system for three-dimensional color ultrasonic images, in which a three-dimensional color ultrasonic image is classified into classes having similar characteristics and encoding and/or decoding them, thereby applying a lossless encoding method more efficiently to the three-dimensional color ultrasonic image and also applying a lossy encoding method thereto.
To accomplish the object according to one aspect of the present invention, there is provided a three-dimensional color ultrasonic image encoding system comprising: a classifier for classifying input ultrasonic image data into zero pixel data, gray pixel data and indexed color pixel data and outputting the classification data; a pixel separator for separating and outputting the gray pixel data and the indexed color pixel data from the input ultrasonic image data, based on the classification data in the classifier; a run-level encoder for run-level-encoding the classification data from the classifier and outputting the run-level-encoded data; encoding means for individually compressing and encoding the gray pixel data and the indexed color pixel data separated from the pixel separator; and a multiplexer for multiplexing the encoded data respectively in the run-level encoder and the encoding means.
According to another aspect of the present invention, there is also provided a three-dimensional color ultrasonic image decoding system comprising: a demultiplexer for demultiplexing encoded data and outputting encoded classification data, encoded color pixel data and encoded gray pixel data; a run-level decoder for run-level-decoding the encoded classification data and outputting the classification data for discerning zero pixel data, gray pixel data and indexed color pixel data; decoding means for individually decoding the encoded gray pixel data and the encoded indexed color pixel data; and an image mixer for generating zero pixel data and mixing the gray pixel data and the indexed color pixel data supplied from the decoding means with the zero pixel data, thereby outputting an ultrasonic image.